from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep
from postion import options
from postion import service

driver = webdriver.Chrome(options=options,service=service)
driver.get(r'https://www.baidu.com/')
sleep(1)

# driver.find_element(By.ID,'kw').clear()
# driver.find_element(By.ID,'kw').send_keys('a6')
# driver.find_element(By.ID,'kw').submit()
# sleep(3)

text = driver.find_element(By.XPATH, '//*[@id="bottom_layer"]/div/p[6]/a').text
print(text)

href = driver.find_element(By.XPATH, '//*[@id="bottom_layer"]/div/p[6]/a').get_attribute('href')
print(href)

is_displayed = driver.find_element(By.XPATH, '//*[@id="bottom_layer"]/div/p[6]/a').is_displayed()
print(is_displayed)

driver.quit()